package action

import (
	"comm/api/commdevice/service"
	"comm/dto"
	"comm/qto"
	"comm/selfreg"
	"core/action"
	"core/corestruct"
	"reflect"
)

type PageAction struct {
}

func (p *PageAction) Do(mm *qto.CommDeviceQto, ctx *corestruct.HttpContext) (*corestruct.Page[dto.CommDeviceDto], error) {
	return service.MainService.Page(mm, ctx)
}

func init() {

	var mact = &PageAction{}
	var maction = action.Action{
		Method: "",

		FullUrl: URLPrev + "/page",
		Name:    PAGEName + "分页",
		Ename:   "",
		Memo:    "",

		PinType:    "",
		PinIslist:  false,
		PoutType:   "",
		PoutIslist: false,
		PoutIspage: false,

		AuthType: action.AuthType_Login,

		LogNeed:     false,
		LogPin:      false,
		LogPout:     false,
		LogTemplete: "",

		PrjName: "",

		Value: reflect.ValueOf(mact),
	}
	selfreg.AddAction(&maction)

}
